#ifndef ICEBERG
#define ICEBERG

#include "message.h"
#include <cstring>
#include <string>
#include <iostream>

using namespace std;

typedef enum sft { leftShift = 0, rightShift } Shift;

class Iceberg
{
	private:
		void S0 ( bool *binary );
		void S1 ( bool *binary );
		void P4 ( bool *binary );
		void P8 ( bool *binary );
		void P64 ( bool *binary );
		void P128 ( bool *binary );
		void D ( bool *binary );
		Message TC ( Message inputMessage, Shift shift );
		Message Gama ( Message inputMessage );
		Message EK ( Message messageA, Message key );
		Message SK ( Message inputMessage, Message key);
		Message BC ( Message inputMessage, Shift shift );
		Message E ( Message message );
		Message f ( Message inputMessage, int selection );
public:
	Message Encrypt ( Message key, Message message, int rounds );
	Message Decrypt( Message key, Message message, int rounds );
};

#endif

